# Stable Captives

## What does this mod fix?

Stable Captives is designed to solve the long-standing **naked bandit bug** that can occur when spawned enemies are captured through DOM or PAHE.

Many bandits, Forsworn and other randomly spawned enemies share the same original character record. If a capture system changes that shared record, another enemy using it may later respawn without the correct outfit.

Stable Captives avoids changing the shared original. When an NPC is captured, the mod gives that individual a private character record and copies the resolved appearance and necessary base information into it. Future enemies using the original record remain untouched.

## The simple version

Before capture, several enemies may be using the same blueprint.

After capture, Stable Captives gives the captured NPC a private blueprint. DOM or PAHE then manages that NPC normally, while the original shared blueprint remains unchanged.

This protects newly spawned enemies from the naked-bandit problem and also gives the captured NPC a stable identity across saving, loading and transfers between supported mods.

## What happens during capture?

1. DOM or PAHE begins its normal capture process.
2. Stable Captives reads the final spawned NPC that Skyrim actually selected.
3. It reserves one free private slot.
4. It copies the NPC's appearance, sex, race, body shape, voice, visual scale and other required base information.
5. It prepares that slot's face files.
6. DOM or PAHE creates and registers the managed NPC.
7. If everything succeeds, the slot becomes that NPC's permanent private slot.

If preparation fails, the reservation is cancelled and DOM or PAHE can use its existing fallback behavior.

## One NPC, one slot

Stable Captives provides 1,024 private slots.

The same NPC continues to use the same single slot while moving between DOM, PAHE, HSH and AYGAS. Sending a captive to an HSH home, transferring them between the supported mods, or selling them through AYGAS does not consume an additional slot.

The slot remains assigned for as long as that NPC still exists in the game world.

## What Stable Captives does not control

Stable Captives deliberately does not manage:

- slave factions or ownership
- dialogue and commands
- quest assignments
- AI behavior
- relationships, training, mood or submission
- transfers, sales or residence systems
- the live NPC's inventory

Those remain entirely under DOM, PAHE, HSH and AYGAS. Stable Captives only protects the private character record, appearance files and slot ownership.

## Appearance and size

The mod preserves the resolved captured appearance, including supported NPC replacers. It also preserves visual scale information used by unusually small or large NPCs, such as custom races or goblin-like enemies, so that they do not return to normal size after saving and loading.

The main purpose is randomly spawned enemies, but the system can also process other NPCs when their required base and face information is available.

## Face files and the zero-byte placeholders

Skyrim does not reliably notice a completely new FaceGen path created after the game has already started. That can produce a black face until the save is reloaded.

To prevent this, the download contains 1,024 empty NIF paths and 1,024 empty DDS paths. They are only placeholders. The selected pair is replaced with the captured NPC's real face data before the managed NPC is created.

These files must remain as loose files and must already exist before Skyrim starts. Do not remove them or pack them into a BSA. Testing showed that BSA placeholders can cause a crash during FaceGen loading.

Face files that have already been filled with real data do not need to be cleaned manually. They are safely replaced the next time that slot is reused.

## Clothing and inventory

The included integration can prevent the cloned character record from carrying the original spawned outfit. This helps stop Skyrim from forcing the old bandit outfit back onto the captive later.

Clothing, restraints and items equipped after capture are live NPC data and remain under the control of DOM, PAHE, HSH and AYGAS. Stable Captives does not independently undress or redress the NPC.

## Saving, loading and multiple characters

Slot ownership persists through saving and loading. It is also protected across different save branches so that one save does not overwrite another save's captive face.

For this reason, long-term testing across several saves may show slots owned by another save. This is intentional protection, not necessarily a leak.

## Release and permanent deletion

If a freed NPC remains alive in the world, the private slot remains in use. The NPC still needs its private appearance and character information.

If DOM permanently deletes a managed spawned captive, Stable Captives first places the slot in a safe waiting state. The slot is returned to the free pool only after the old NPC reference can no longer be found. This prevents a new captive from receiving the same slot while Skyrim or another script may still be using the old one.

Ordinary transfers, sales, residence placement and releases that leave the NPC alive do not free the slot.

## MCM tools

The MCM shows the number of free, active, reserved and retiring slots, including slots protected for other save branches.

`Reclaim confirmed deleted Actors` only returns slots whose former NPC has been confirmed deleted. It does not reclaim living or normally released NPCs.

`Factory Reset` is an administrative/testing tool for clearing the shared slot registry from a suitable clean save. It refuses to run while the current save still owns active, reserved or retiring slots. It does not erase DOM records and does not turn completed face files back into empty placeholders.

Debug Mode enables the F10 diagnostic display. Normal gameplay remains free of the diagnostic NPC messages.

## Existing captives

Stable Captives is not retroactive. It applies to NPCs newly processed through the integrated DOM or PAHE capture path after installation. Captives that already existed beforehand are not automatically converted.

## Requirements and important notes

- Designed and tested for Skyrim SE 1.5.97
- Requires SKSE 2.0.20, Address Library 2.0 and SkyUI
- Requires compatible DOM/PAHE integration scripts that call the Stable Captives API
- The FaceGen placeholder NIF/DDS files must remain loose and present before game startup
- If all 1,024 slots are occupied, DOM or PAHE should use its existing fallback behavior
- A mod that permanently deletes a managed NPC through an unrelated path may need to notify Stable Captives before the slot can be reclaimed

## In one sentence

Stable Captives gives each newly captured spawned NPC a private, persistent identity so the original enemy template remains untouched—preventing naked respawns while preserving the captive's face and appearance across the supported slave-management mods.
